using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Enemy_Boss : Enemy
{
    public BossIdleState bossIdleState;
    public BossBattleState bossBattleState;
    public BossAttackState bossAttackState;

    protected override void Awake()
    {
        base.Awake();
        bossIdleState = new BossIdleState(this, this, stateMachine, "Idle");
        bossBattleState = new BossBattleState(this, this, stateMachine, "Idle");
        bossAttackState = new BossAttackState(this, this, stateMachine, "Attack");
    }

    protected override void Start()
    {
        base.Start();
        stateMachine.Initialize(bossIdleState);
    }

    protected override void Update()
    {
        base.Update();
    }

    public override void AttackTrigger()
    {
        Collider2D[] cols = IsAttackDetected();

        foreach (Collider2D col in cols)
        {
            Player p = null;
            if (p = col.GetComponent<Player>())
            {
                cs.DoMagicalDamage(p.GetComponent<PlayerStats>(), DamageType.FireDamage, null);
            }
        }
    }

}
